import { request } from '@/network/http.js'
export const login = p => request('post', '/back/admin/login', p) // 后台登录
export const getMenus = p => request('post', '/back/admin/getMenus', p, true, false) // 获取权限树以及个人信息
// 权限管理
export const getAuthList = p => request('post', '/back/menu/getAuthList', p, true, false) // 获取权限列表
export const getAuthOnly = p => request('post', '/back/menu/getAuthOnly', p, true, false) // 获取单个权限
export const editAuth = p => request('post', '/back/menu/editAuth', p) // 编辑权限
export const addAuth = p => request('post', '/back/menu/addAuth', p) // 添加权限
export const delAuth = p => request('post', '/back/menu/delAuth', p) // 删除权限
// 超管左侧菜单管理
export const getMenuList = p => request('post', '/back/menu/getMenuList', p, true, false) // 获取菜单列表
export const editMenu = p => request('post', '/back/menu/editMenu', p) // 编辑超管左侧菜单
// 角色管理
export const getRoleList = p => request('post', '/back/role/getRoleList', p, true, false) // 获取角色列表
export const getAdminAuth = p => request('post', '/back/menu/getAdminAuth', p, true, false) // 获取当前管理员权限
export const getRoleOnly = p => request('post', '/back/role/getRoleOnly', p, true, false) // 获取单个角色信息
export const getRoleMenuOnly = p => request('post', '/back/role/getRoleMenuOnly', p, true, false) // 获取单个角色菜单信息
export const addRole = p => request('post', '/back/role/addRole', p) // 添加角色
export const changeRoleStatus = p => request('post', '/back/role/changeRoleStatus', p) // 修改角色状态
export const delRole = p => request('post', '/back/role/delRole', p) // 删除角色
export const editRole = p => request('post', '/back/role/editRole', p) // 编辑角色信息
export const editRoleMenu = p => request('post', '/back/role/editRoleMenu', p) // 编辑角色菜单信息
// 管理员管理
export const getAdminList = p => request('post', '/back/admin/getAdminList', p, true, false) // 获取管理员列表
export const getAdminRole = p => request('post', '/back/role/getAdminRole', p, true, false) // 获取当前管理员下级角色
export const addAdmin = p => request('post', '/back/admin/addAdmin', p) // 添加管理员
export const changeAdminStatus = p => request('post', '/back/admin/changeAdminStatus', p) // 修改管理员状态
export const getAdminOnly = p => request('post', '/back/admin/getAdminOnly', p, true, false) // 获取单个管理员信息
export const delAdmin = p => request('post', '/back/admin/delAdmin', p) // 删除管理员
export const editAdmin = p => request('post', '/back/admin/editAdmin', p) // 编辑管理信息
export const forceAdminPwd = p => request('post', '/back/admin/forceAdminPwd', p) // 强制修改管理员密码
// 机构管理
export const getOrgList = p => request('post', '/back/org/getOrgList', p, true, false) // 获取机构列表
export const getOrgOther = p => request('post', '/back/org/getOther', p, true, false) // 获取附属信息
export const getOrgOnly = p => request('post', '/back/org/getOrgOnly', p, true, false) // 获取单个机构信息
export const addOrg = p => request('post', '/back/org/addOrg', p) // 添加机构
export const changeOrgStatus = p => request('post', '/back/org/changeOrgStatus', p) // 修改机构状态
export const delOrg = p => request('post', '/back/org/delOrg', p) // 删除机构
export const editOrg = p => request('post', '/back/org/editOrg', p) // 编辑机构
// 运输队管理
export const getDriverList = p => request('post', '/back/driver/getDriverList', p, true, false) // 获取司机列表
export const getDriverOnly = p => request('post', '/back/driver/getOnly', p, true, false) // 获取单个司机信息
export const addDriver = p => request('post', '/back/driver/addDriver', p) // 添加司机
export const changeDriverStatus = p => request('post', '/back/driver/changeStatus', p) // 修改司机状态
export const delDriver = p => request('post', '/back/driver/delete', p) // 删除司机
export const forceDriverPwd = p => request('post', '/back/driver/forcePwd', p) // 强制修改司机密码
export const editDriver = p => request('post', '/back/driver/edit', p) // 编辑司机
// 资金模板管理
export const getTempList = p => request('post', '/back/template/lst', p, true, false) // 获取模板列表
export const getTempOnly = p => request('post', '/back/template/getOnly', p, true, false) // 获取单个模板信息
export const addTemp = p => request('post', '/back/template/add', p) // 添加资金模板
export const delTemp = p => request('post', '/back/template/delete', p) // 删除模板
export const changeTempStatus = p => request('post', '/back/template/changeStatus', p) // 修改模板状态
export const editTemp = p => request('post', '/back/template/edit', p) // 编辑模板
// 商品分类管理
export const lstFirAndSec = p => request('post', '/back/category/lstFirAndSec', p, true, false) // 获取一二级分类列表以及模板
export const getCateList = p => request('post', '/back/category/lst', p, true, false) // 获取分类列表
export const addCate = p => request('post', '/back/category/add', p, true, true, 'pic') // 添加分类
export const getCateOnly = p => request('post', '/back/category/getOnly', p, true, false) // 获取单个分类信息
export const delCate = p => request('post', '/back/category/delete', p) // 删除分类
export const changeCateStatus = p => request('post', '/back/category/changeStatus', p) // 修改分类状态
export const editCate = p => request('post', '/back/category/edit', p, true, true, 'pic') // 编辑分类
// 轮播图管理
export const getBannerList = p => request('post', '/back/banner/lst', p, true, false) // 获取轮播图列表
export const addBanner = p => request('post', '/back/banner/add', p, true, true, 'pic') // 添加轮播图
export const getBannerOnly = p => request('post', '/back/banner/getOnly', p, true, false) // 获取单个轮播图信息
export const changeBannerStatus = p => request('post', '/back/banner/changeStatus', p) // 修改轮播图状态
export const delBanner = p => request('post', '/back/banner/delete', p) // 删除轮播图
export const editBanner = p => request('post', '/back/banner/edit', p, true, true, 'pic') // 编辑轮播图
// 商品管理
export const getGoodsOther = p => request('post', '/back/goods/getOther', p, true, false) // 获取添加编辑额外信息
